<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class Psa_Validator</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name"><img src="../media/images/Class_logo.png"
														alt=" Class"
														title=" Class"
														style="vertical-align: middle"> Psa_Validator</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Class for input data validation.</p>
<p class="description"><p>You should validate input data from users that you sent to model methods. Methods in this class can help you with that.  Validation should occur in the model method itself, not in controller (or in some action method). That makes your model  methods more standalone, and more reusable in some future projects.</p><p><strong>Example:</strong></p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-php">&lt;?php</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<span class="src-comm">//&nbsp;model&nbsp;plugin</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-key">class&nbsp;</span><span class="src-id">search&nbsp;</span><span class="src-key">extends&nbsp;</span><a href="../psa/plugins/Psa_Plugin_Model.html">Psa_Plugin_Model</a><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;search&nbsp;method</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-key">function&nbsp;</span><span class="src-id">filter</span><span class="src-sym">(</span><span class="src-var">$search_word</span><span class="src-sym">,&nbsp;</span><span class="src-var">$max_results</span><span class="src-sym">,&nbsp;</span><span class="src-var">$only_pages</span><span class="src-sym">)</span><span class="src-sym">{</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;input&nbsp;validation</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$validator&nbsp;</span>=&nbsp;<span class="src-key">new&nbsp;</span><span class="src-id"><a href="../psa/Psa_Validator.html">Psa_Validator</a></span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$validator</span><span class="src-sym">-&gt;</span><span class="src-id">add_required&nbsp;</span><span class="src-sym">(</span><span class="src-var">$search_word</span><span class="src-sym">,</span><span class="src-str">'string'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$validator</span><span class="src-sym">-&gt;</span><span class="src-id">add_optional&nbsp;</span><span class="src-sym">(</span><span class="src-var">$max_results</span><span class="src-sym">,</span><span class="src-str">'int'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$validator</span><span class="src-sym">-&gt;</span><span class="src-id">add_optional&nbsp;</span><span class="src-sym">(</span><span class="src-var">$only_pages</span><span class="src-sym">,</span><span class="src-str">'int_array'</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-var">$validator</span><span class="src-sym">-&gt;</span><span class="src-id">validate</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;Method&nbsp;logic&nbsp;starts&nbsp;here.&nbsp;For&nbsp;example&nbsp;to&nbsp;query&nbsp;database</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-comm">//&nbsp;using&nbsp;$search_word&nbsp;and&nbsp;$max_results</span></div></li>
<li><div class="src-line">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-sym">}</span></div></li>
<li><div class="src-line">&nbsp;</div></li>
<li><div class="src-line">&nbsp;<span class="src-php">?&gt;</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">see:</span> validate();</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_scripts---Psa_Validator.class.php.html">/scripts/Psa_Validator.class.php</a> (line <span class="field"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a62">62</a></span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																																																																																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#add_optional" title="details" class="method-name">add_optional</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$param3</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#add_required" title="details" class="method-name">add_required</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param3</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#callback" title="details" class="method-name">callback</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$param1</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param3</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#check_regex" title="details" class="method-name">check_regex</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$pattern</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#equal" title="details" class="method-name">equal</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param1</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#fail" title="details" class="method-name">fail</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$message</span> = <span class="var-default">''</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$code</span> = <span class="var-default">63</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#identical" title="details" class="method-name">identical</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param1</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_alpha" title="details" class="method-name">is_alpha</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_alphanum" title="details" class="method-name">is_alphanum</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_between" title="details" class="method-name">is_between</a>
											(<span class="var-type">float</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">float|bool</span>&nbsp;<span class="var-name">$min</span> = <span class="var-default">null</span>], [<span class="var-type">float|bool</span>&nbsp;<span class="var-name">$max</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">void</span>
										<a href="#is_date" title="details" class="method-name">is_date</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$format</span> = <span class="var-default">'mm.dd.yyyy'</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_domainsafe" title="details" class="method-name">is_domainsafe</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_email" title="details" class="method-name">is_email</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_float" title="details" class="method-name">is_float</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_hostname" title="details" class="method-name">is_hostname</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_id" title="details" class="method-name">is_id</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_int" title="details" class="method-name">is_int</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_invalues" title="details" class="method-name">is_invalues</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$values</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_ip4" title="details" class="method-name">is_ip4</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_lenbetween" title="details" class="method-name">is_lenbetween</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">int|bool</span>&nbsp;<span class="var-name">$min</span> = <span class="var-default">null</span>], [<span class="var-type">int|bool</span>&nbsp;<span class="var-name">$max</span> = <span class="var-default">null</span>])
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_num" title="details" class="method-name">is_num</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_string" title="details" class="method-name">is_string</a>
											(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#is_url" title="details" class="method-name">is_url</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
									</div>
																<div class="method-definition">
					<img src="../media/images/Method.png" alt=" "/>
											<span class="method-result">bool</span>
										<a href="#validate" title="details" class="method-name">validate</a>
										()
									</div>
											</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
													<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodadd_optional" id="add_optional"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">add_optional</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a142">142</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">This method does the same as add_required() method and only difference is that  evaluated value can be empty string or null.</p>
<p class="description"><p>For example this can be useful for values from optional HTML form elements.  See example in <a href="../psa/Psa_Validator.html">class description</a>.</p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodadd_required">Psa_Validator::add_required()</a></li>
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodvalidate">Psa_Validator::validate()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			add_optional
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$param3</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param2</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$param3</span>			</li>
				</ul>
		
			
	</div>
<a name="methodadd_required" id="add_required"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">add_required</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a124">124</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Adds values for later validation with validate() method.</p>
<p class="description"><p>See example in <a href="../psa/Psa_Validator.html">class description</a>.</p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodadd_optional">Psa_Validator::add_optional()</a></li>
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodvalidate">Psa_Validator::validate()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			add_required
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param3</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$value</span><span class="var-description">: value to be evaluated.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: <p>can be <kbd>int</kbd>, <kbd>id</kbd>, <kbd>date</kbd>,  <kbd>string</kbd>, <kbd>email</kbd>, <kbd>ip4</kbd>, <kbd>float</kbd>, <kbd>alpha</kbd>,  <kbd>num</kbd>, <kbd>alphanum</kbd>, <kbd>regex</kbd>, <kbd>domainsafe</kbd>,  <kbd>invalues</kbd>, <kbd>url</kbd>, <kbd>between</kbd>, <kbd>lenbetween</kbd>,  <kbd>equal</kbd>, <kbd>identical</kbd>, <kbd>hostname</kbd>, <kbd>callback</kbd></p><p>If <var>$value</var> is an array, suffix <kbd>_array</kbd> can be added to any of these  types to validate each element of array <var>$value</var>. For example, this is useful  when validating input from HTML drop-down menu with multiple selections.</p></span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param2</span><span class="var-description">: if set it will be passed as second parameter to <em>is_</em> methods where needed.  Like with <kbd>date</kbd> and <kbd>regex</kbd> validation types.</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param3</span><span class="var-description">: like <kbd>$param2</kbd></span>			</li>
				</ul>
		
			
	</div>
<a name="methodcallback" id="callback"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">callback</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a756">756</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calls user function or method which has to return true or false.</p>
<p class="description"><p>It calls PHP call_user_func() function.  This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			callback
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$param1</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param3</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$param1</span><span class="var-description">: user function name</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param2</span><span class="var-description">: first parameter for user function</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param3</span><span class="var-description">: second parameter for user function</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcheck_regex" id="check_regex"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">check_regex</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a721">721</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Searches <var>$value</var> for a match to the regular expression given in <var>$pattern</var>.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			check_regex
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$pattern</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$pattern</span><span class="var-description">: complete pattern for PHP <kbd>preg_match()</kbd> function. For example: <em>/^[1-9]+$/</em></span>			</li>
				</ul>
		
			
	</div>
<a name="methodequal" id="equal"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">equal</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a771">771</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns true if parameters are equal.</p>
<p class="description"><p>Uses '==' operator for comparison.  This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			equal
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param1</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param1</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param2</span>			</li>
				</ul>
		
			
	</div>
<a name="methodfail" id="fail"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">fail</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a170">170</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Just throws Psa_Validation_Exception</p>
	<ul class="tags">
				<li><span class="field">throws:</span> Psa_Validation_Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			fail
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$message</span> = <span class="var-default">''</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$code</span> = <span class="var-default">63</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$message</span><span class="var-description">: exception message</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$code</span><span class="var-description">: exception code</span>			</li>
				</ul>
		
			
	</div>
<a name="methodidentical" id="identical"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">identical</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a788">788</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns true if parameters are identical.</p>
<p class="description"><p>Uses '===' operator for comparison.  This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			identical
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$param1</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$param2</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param1</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$param2</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_alpha" id="is_alpha"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_alpha</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a629">629</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks whether the given <var>$value</var> contains letters only.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_alpha
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_alphanum" id="is_alphanum"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_alphanum</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a661">661</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks whether the given <var>$value</var> contains alphanumeric characters only.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_alphanum
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_between" id="is_between"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_between</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a413">413</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Finds whether the given <var>$value</var> is between (or equal) $min and $max.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_between
		</span>
					(<span class="var-type">float</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">float|bool</span>&nbsp;<span class="var-name">$min</span> = <span class="var-default">null</span>], [<span class="var-type">float|bool</span>&nbsp;<span class="var-name">$max</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">float</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
					<li>
				<span class="var-type">float|bool</span>
				<span class="var-name">$min</span><span class="var-description">: if null only <kbd>$max</kbd> argument is evaluated</span>			</li>
					<li>
				<span class="var-type">float|bool</span>
				<span class="var-name">$max</span><span class="var-description">: if null only <kbd>$min</kbd> argument is evaluated</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_date" id="is_date"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_date</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a518">518</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks date if matches given format and validity of the date.</p>
<p class="description"><p>This method can be called statically.  Examples:</p><p><div class="src-code"><ol><li><div class="src-line">&nbsp;<span class="src-id"><a href="../psa/Psa_Validator.html">Psa_Validator</a></span><span class="src-sym">::</span><a href="../psa/Psa_Validator.html#methodis_date">is_date</a><span class="src-sym">(</span><span class="src-str">'22.22.2222'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'mm.dd.yyyy'</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;returns&nbsp;false</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id"><a href="../psa/Psa_Validator.html">Psa_Validator</a></span><span class="src-sym">::</span><a href="../psa/Psa_Validator.html#methodis_date">is_date</a><span class="src-sym">(</span><span class="src-str">'11/30/2008'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'mm/dd/yyyy'</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;returns&nbsp;true</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id"><a href="../psa/Psa_Validator.html">Psa_Validator</a></span><span class="src-sym">::</span><a href="../psa/Psa_Validator.html#methodis_date">is_date</a><span class="src-sym">(</span><span class="src-str">'30-01-2008'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'dd-mm-yyyy'</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;returns&nbsp;true</span></div></li>
<li><div class="src-line">&nbsp;<span class="src-id"><a href="../psa/Psa_Validator.html">Psa_Validator</a></span><span class="src-sym">::</span><a href="../psa/Psa_Validator.html#methodis_date">is_date</a><span class="src-sym">(</span><span class="src-str">'2008&nbsp;01&nbsp;30'</span><span class="src-sym">,&nbsp;</span><span class="src-str">'yyyy&nbsp;mm&nbsp;dd'</span><span class="src-sym">)</span><span class="src-sym">;&nbsp;</span><span class="src-comm">//&nbsp;returns&nbsp;true</span></div></li>
</ol></div></p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			is_date
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$format</span> = <span class="var-default">'mm.dd.yyyy'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$format</span><span class="var-description">: Format of the date. Any combination of <em>mm</em>, <em>dd</em>, <em>yyyy</em>  with a single character separator between.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_domainsafe" id="is_domainsafe"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_domainsafe</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a682">682</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks whether the given <var>$value</var> contains only domain name safe characters only.</p>
<p class="description"><p>Those are: letters, numbers, hyphens. Dot '.' is not included cause it separates domain  levels thus it is not part of domain name.  This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodis_hostname">Psa_Validator::is_hostname()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_domainsafe
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_email" id="is_email"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_email</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a556">556</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Finds whether the given <var>$value</var> has valid email format.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_email
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_float" id="is_float"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_float</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a592">592</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks is the given <var>$value</var> valid floating point number.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_float
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_hostname" id="is_hostname"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_hostname</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a702">702</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">The same as is_domainsafe but dot '.' is also included.</p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodis_domainsafe">Psa_Validator::is_domainsafe()</a></li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_hostname
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_id" id="is_id"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_id</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a495">495</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Finds whether the given <var>$value</var> is integer bigger than 0.</p>
<p class="description"><p>Positive integer is often used as primary key in database tables therefore name <em>is_id</em>.  This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_id
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_int" id="is_int"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_int</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a477">477</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks is the given <var>$value</var> an integer.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_int
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_invalues" id="is_invalues"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_invalues</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a461">461</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Finds whether the given <var>$value</var> is in array passed as second argument.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_invalues
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$values</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$values</span><span class="var-description">: array of valid values</span>			</li>
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_ip4" id="is_ip4"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_ip4</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a571">571</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks is the given <var>$value</var> valid ip v4 address.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_ip4
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_lenbetween" id="is_lenbetween"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_lenbetween</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a438">438</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Finds whether the length of the given <var>$value</var> is between (or equal) $min and $max.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_lenbetween
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>, [<span class="var-type">int|bool</span>&nbsp;<span class="var-name">$min</span> = <span class="var-default">null</span>], [<span class="var-type">int|bool</span>&nbsp;<span class="var-name">$max</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
					<li>
				<span class="var-type">int|bool</span>
				<span class="var-name">$min</span><span class="var-description">: if null only <kbd>$max</kbd> argument is evaluated</span>			</li>
					<li>
				<span class="var-type">int|bool</span>
				<span class="var-name">$max</span><span class="var-description">: if null only <kbd>$min</kbd> argument is evaluated</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_num" id="is_num"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_num</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a646">646</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks whether the given <var>$value</var> contains numbers only.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_num
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_string" id="is_string"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_string</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a609">609</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks whether the given <var>$value</var> is valid string.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_string
		</span>
					(<span class="var-type">$value</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">$value</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodis_url" id="is_url"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">is_url</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a736">736</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Checks if given <var>$value</var> is valid URL.</p>
<p class="description"><p>This method can be called statically.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			is_url
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$value</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$value</span><span class="var-description">: the variable being evaluated.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodvalidate" id="validate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<img src="../media/images/Method.png" />
		<span class="method-title">validate</span> (line <span class="line-number"><a href="../__filesource/fsource_psa__scriptsPsa_Validator.class.php.html#a219">219</a></span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Validates all values set by add_required() and add_optional() methods.</p>
<p class="description"><p>If validation of any value fails raises exception (or returns false, see __construct()),  otherwise returns true. See example in <a href="../psa/Psa_Validator.html">class description</a>.  It will throw <a href="../psa/exceptions/Psa_Validation_Exception.html">Psa_Validation_Exception</a> when first validation fails. For example, you can  catch this exception in controller and call another action.</p></p>
	<ul class="tags">
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodadd_required">Psa_Validator::add_required()</a></li>
				<li><span class="field">see:</span> <a href="../psa/Psa_Validator.html#methodadd_optional">Psa_Validator::add_optional()</a></li>
				<li><span class="field">throws:</span> Psa_Validation_Exception</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			validate
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>

	
	<p class="notes" id="credit">
		Documentation generated on Thu, 21 Oct 2010 01:40:58 +0200 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>